package com.frame.work.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frame.work.entity.TblMeteringLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wjming
 */
@DS("slave_1")
public interface TblMeteringLogMapper extends BaseMapper<TblMeteringLog> {
    /**
     * 通过开始时间和结束时间选择日志信息
     *
     * @param deviceMac
     * @param start
     * @param end
     * @return
     */
    List<TblMeteringLog> selectByTime(@Param("deviceMac") String deviceMac, @Param("start") String start, @Param("end") String end);

    /**
     * 查询每月的电量信息
     *
     * @param deviceMac
     * @return
     */
    List<Double> selectElectricNumByMonth(@Param("deviceMac") String deviceMac);
}
